package vip.mate.demo.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.mate.core.auth.annotation.PreAuth;
import vip.mate.core.common.api.Result;
import vip.mate.core.log.annotation.Log;

/**
 * 演示控制类
 *
 * @author pangu
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/demo")
@Api(tags = "演示管理")
public class DemoController {

	@Log
	// @PreAuth
	@GetMapping("/test")
	@ApiOperation(value = "演示测试", notes = "演示测试")
	public Result<?> test() {
		log.info("打印下测试日志");
		return Result.data("成功");
	}
}
